Skip to content

Conversation

@natmokval
Copy link
Contributor

@natmokval natmokval commented Oct 28, 2025

Updated the docstring in the initialiser for RangeIndex.
I noticed, if step parameter is None, it defaults to 1. We have a similar case in slice_indexer

Parameters
----------
start : label, default None
If None, defaults to the beginning.
end : label, default None
If None, defaults to the end.
step : int, default None
If None, defaults to 1.

should we also clarify for step parameter: If None, defaults to 1.?

@cmp0xff
Copy link
Contributor

cmp0xff commented Oct 28, 2025

Hi, I would like to mention that dtype also defaults to None in the source code.

@natmokval natmokval added the Docs label Oct 28, 2025
@natmokval
Copy link
Contributor Author

Hi, I would like to mention that dtype also defaults to None in the source code.

thanks, I added to dtype default None.

@mroeschke mroeschke added this to the 3.0 milestone Oct 29, 2025
@mroeschke mroeschke merged commit ec4c97d into pandas-dev:main Oct 29, 2025
47 checks passed
@mroeschke
Copy link
Member

Thanks @natmokval

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DOC: inconsistent default values in the initialiser for RangeIndex

3 participants